import Vue from 'vue'
var mixins = {
    methods:{
        operatorConfirm(action,text){
            this.$confirm(`是否离开此网页${text}`,"提示",{
                confirmButtonText:"确定",
                cancelButtonText:'取消',
                type:'warning'
            }).then(()=>{
                this.$message({
                    type:'danger',
                    message:`${text}成功`
                })
                action();
            }).catch(()=>{
                this.$message({
                    type:"info",
                    message:`取消${text}`
                })
            })
        },
        pushToView(item,query,params){
            this.$router.push({name:item.name,path:item.path,query:query,params:params})
        }
    }
}
Vue.mixin(mixins);

export default {}